#include <iostream>
#include "FileWriter.hpp"
#include "Client.hpp"
#include "IWriteStrategy.hpp"
#include "MemWriter.hpp"


int main()
{
    
    CFileWriter write("filename");
    CClient c(&write);

    auto handerl{
        write.GetWriteEvent()+=[](int pos,int length){
            std::cout << "lambda: write" << pos << ", " << length << std::endl;
        }
    };

    c.DoProcess();

    // CFileWriter lazywrite("filename",StrategyTag::LAZY);
    // CClient c1(&lazywrite);
    // c1.DoProcess();

    write.GetWriteEndEvent()-=handerl;

    c.DoProcess();

    // CMemWriter mWriter{};
    // CClient b(&mWriter);
    // b.DoProcess();
    return 0;
}
